import request from '/@/utils/request';

export function goodsServiceApi() {
	return {
		create: (data: object) => {
			return request({
				url: '/management/goods/service/create',
				method: 'post',
				data,
			});
		},
		update: (data: object) => {
			return request({
				url: '/management/goods/service/update',
				method: 'put',
				data,
			});
		},

		delete: (id: any) => {
			return request({
				url: `/management/goods/service/delete/${id}`,
				method: 'delete',
			});
		},
		view: (id: any) => {
			return request({
				url: `/management/goods/service/view/${id}`,
				method: 'get',
			});
		},
		search: (data: object) => {
			return request({
				url: '/management/goods/service/search',
				method: 'post',
				data,
			});
		},
		searchList: (data: object) => {
			return request({
				url: '/management/goods/service/searchlist',
				method: 'post',
				data,
			});
		},
	};
}
